@function hsb($h-hsb, $s-hsb, $b-hsb, $a: 1) {
  @if $b-hsb==0 {
    @return hsla(0, 0, 0, $a)
  }

  @else {
    $l-hsl: ($b-hsb/2) * (2 - ($s-hsb/100));
    $s-hsl: ($b-hsb * $s-hsb) / if($l-hsl < 50, $l-hsl * 2, 200 - $l-hsl * 2);
    @return hsla($h-hsb, $s-hsl, $l-hsl, $a);
  }
}
